package com.jic.order.service;

import com.jic.common.base.vo.RestResult;
import com.jic.order.rest.request.*;
import com.jic.order.rest.response.ShoppingCartAddResponse;
import com.jic.order.rest.response.ShoppingCartInfoListQueryResponse;
import com.jic.order.entity.ShoppingCartSubInfoEntity;

/**
 * @author: gaolanyu
 * @date: 2020-01-25
 * @remark:
 */
public interface ShoppingCartService {
    public RestResult<ShoppingCartAddResponse> add(ShoppingCartAddRequest shoppingCartAddRequest, boolean directFlag);

    public RestResult<ShoppingCartInfoListQueryResponse> queryShoppingCart(ShoppingCartInfoListQueryRequest shoppingCartInfoListQueryRequest, boolean directFlag);

    public RestResult<Boolean> delete(ShoppingCartDeleteRequest shoppingCartDeleteRequest, boolean directFlag);

    public RestResult<Boolean> editNum(ShoppingCartEditRequest shoppingCartEditRequest, boolean directFlag);

    public RestResult<Boolean> selected(ShoppingCartSelectedRequest shoppingCartSelectedRequest, boolean directFlag);

    public RestResult<Boolean> unSelected(ShoppingCartSelectedRequest shoppingCartSelectedRequest, boolean directFlag);

    public RestResult<Integer> queryShoppingCartNum(UserRequest userRequest, boolean directFlag);


    public String getShoppingCartEntityKey(long userId, boolean directFlag);

    public String getShoppingCartGoodsInfoEntityKey(long userId, String shoppingCartGoodsInfoEntityKey, boolean directFlag);

    public void saveNewEntityToRedis(Object entity, String redisKey);

    public Boolean getSelectedStatus(String selected);

    public String getShoppingCartSubInfoEntityKey(long userId, String shoppingCartSubInfoListKey, boolean directFlag);

    public ShoppingCartSubInfoEntity getShoppingCartSubId(String goodsId);

    public String getUserIdByToken(String token);

    public Boolean deleteGoodsInfo(ShoppingCartDeleteRequest request, boolean directFlag);
}
